{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from pandas import DataFrame,Series\n",
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [
    {
     "data": {
      "text/plain": "       期中          期末        \n       语文  数学  英语  语文  数学  英语\n1班 张三  43  33  55  71  10   9\n   李四  75  65  64  52  11  96\n   王五  29  38  45  65  54  97\n2班 张三  19  55  72  13  73  65\n   李四  29  28  19   7  61  60\n   王五  19  70  85  73  96  15",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead tr th {\n        text-align: left;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr>\n      <th></th>\n      <th></th>\n      <th colspan=\"3\" halign=\"left\">期中</th>\n      <th colspan=\"3\" halign=\"left\">期末</th>\n    </tr>\n    <tr>\n      <th></th>\n      <th></th>\n      <th>语文</th>\n      <th>数学</th>\n      <th>英语</th>\n      <th>语文</th>\n      <th>数学</th>\n      <th>英语</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th rowspan=\"3\" valign=\"top\">1班</th>\n      <th>张三</th>\n      <td>43</td>\n      <td>33</td>\n      <td>55</td>\n      <td>71</td>\n      <td>10</td>\n      <td>9</td>\n    </tr>\n    <tr>\n      <th>李四</th>\n      <td>75</td>\n      <td>65</td>\n      <td>64</td>\n      <td>52</td>\n      <td>11</td>\n      <td>96</td>\n    </tr>\n    <tr>\n      <th>王五</th>\n      <td>29</td>\n      <td>38</td>\n      <td>45</td>\n      <td>65</td>\n      <td>54</td>\n      <td>97</td>\n    </tr>\n    <tr>\n      <th rowspan=\"3\" valign=\"top\">2班</th>\n      <th>张三</th>\n      <td>19</td>\n      <td>55</td>\n      <td>72</td>\n      <td>13</td>\n      <td>73</td>\n      <td>65</td>\n    </tr>\n    <tr>\n      <th>李四</th>\n      <td>29</td>\n      <td>28</td>\n      <td>19</td>\n      <td>7</td>\n      <td>61</td>\n      <td>60</td>\n    </tr>\n    <tr>\n      <th>王五</th>\n      <td>19</td>\n      <td>70</td>\n      <td>85</td>\n      <td>73</td>\n      <td>96</td>\n      <td>15</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = np.random.randint(0, 100, size=(6, 6))\n",
    "index = pd.MultiIndex.from_product(\n",
    "    [\n",
    "        ['1班',  '2班'],\n",
    "        ['张三', '李四', '王五']\n",
    "    ]\n",
    ")\n",
    "columns = [\n",
    "    ['期中', '期中', '期中', '期末', '期末', '期末'],\n",
    "    ['语文', '数学', '英语', '语文', '数学', '英语']\n",
    "]\n",
    "df = pd.DataFrame(data=data, index=index, columns=columns)\n",
    "df"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "outputs": [
    {
     "data": {
      "text/plain": "          数学  英语  语文\n1班 张三 期中  33  55  43\n      期末  10   9  71\n   李四 期中  65  64  75\n      期末  11  96  52\n   王五 期中  38  45  29\n      期末  54  97  65\n2班 张三 期中  55  72  19\n      期末  73  65  13\n   李四 期中  28  19  29\n      期末  61  60   7\n   王五 期中  70  85  19\n      期末  96  15  73",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th></th>\n      <th></th>\n      <th>数学</th>\n      <th>英语</th>\n      <th>语文</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th rowspan=\"6\" valign=\"top\">1班</th>\n      <th rowspan=\"2\" valign=\"top\">张三</th>\n      <th>期中</th>\n      <td>33</td>\n      <td>55</td>\n      <td>43</td>\n    </tr>\n    <tr>\n      <th>期末</th>\n      <td>10</td>\n      <td>9</td>\n      <td>71</td>\n    </tr>\n    <tr>\n      <th rowspan=\"2\" valign=\"top\">李四</th>\n      <th>期中</th>\n      <td>65</td>\n      <td>64</td>\n      <td>75</td>\n    </tr>\n    <tr>\n      <th>期末</th>\n      <td>11</td>\n      <td>96</td>\n      <td>52</td>\n    </tr>\n    <tr>\n      <th rowspan=\"2\" valign=\"top\">王五</th>\n      <th>期中</th>\n      <td>38</td>\n      <td>45</td>\n      <td>29</td>\n    </tr>\n    <tr>\n      <th>期末</th>\n      <td>54</td>\n      <td>97</td>\n      <td>65</td>\n    </tr>\n    <tr>\n      <th rowspan=\"6\" valign=\"top\">2班</th>\n      <th rowspan=\"2\" valign=\"top\">张三</th>\n      <th>期中</th>\n      <td>55</td>\n      <td>72</td>\n      <td>19</td>\n    </tr>\n    <tr>\n      <th>期末</th>\n      <td>73</td>\n      <td>65</td>\n      <td>13</td>\n    </tr>\n    <tr>\n      <th rowspan=\"2\" valign=\"top\">李四</th>\n      <th>期中</th>\n      <td>28</td>\n      <td>19</td>\n      <td>29</td>\n    </tr>\n    <tr>\n      <th>期末</th>\n      <td>61</td>\n      <td>60</td>\n      <td>7</td>\n    </tr>\n    <tr>\n      <th rowspan=\"2\" valign=\"top\">王五</th>\n      <th>期中</th>\n      <td>70</td>\n      <td>85</td>\n      <td>19</td>\n    </tr>\n    <tr>\n      <th>期末</th>\n      <td>96</td>\n      <td>15</td>\n      <td>73</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 把列索引变成行索引\n",
    "df.stack(level=1)\n",
    "df.stack(level=0)\n",
    "# level等于哪一个，哪一个就消失，出现在行里\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "source": [
    "# 把行索引变成列索引\n",
    "df.unstack()\n",
    "df.unstack(level=0)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "execution_count": 10,
   "outputs": [
    {
     "data": {
      "text/plain": "    期中                      期末                    \n    语文      数学      英语      语文      数学      英语    \n    1班  2班  1班  2班  1班  2班  1班  2班  1班  2班  1班  2班\n张三  43  19  33  55  55  72  71  13  10  73   9  65\n李四  75  29  65  28  64  19  52   7  11  61  96  60\n王五  29  19  38  70  45  85  65  73  54  96  97  15",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead tr th {\n        text-align: left;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr>\n      <th></th>\n      <th colspan=\"6\" halign=\"left\">期中</th>\n      <th colspan=\"6\" halign=\"left\">期末</th>\n    </tr>\n    <tr>\n      <th></th>\n      <th colspan=\"2\" halign=\"left\">语文</th>\n      <th colspan=\"2\" halign=\"left\">数学</th>\n      <th colspan=\"2\" halign=\"left\">英语</th>\n      <th colspan=\"2\" halign=\"left\">语文</th>\n      <th colspan=\"2\" halign=\"left\">数学</th>\n      <th colspan=\"2\" halign=\"left\">英语</th>\n    </tr>\n    <tr>\n      <th></th>\n      <th>1班</th>\n      <th>2班</th>\n      <th>1班</th>\n      <th>2班</th>\n      <th>1班</th>\n      <th>2班</th>\n      <th>1班</th>\n      <th>2班</th>\n      <th>1班</th>\n      <th>2班</th>\n      <th>1班</th>\n      <th>2班</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>张三</th>\n      <td>43</td>\n      <td>19</td>\n      <td>33</td>\n      <td>55</td>\n      <td>55</td>\n      <td>72</td>\n      <td>71</td>\n      <td>13</td>\n      <td>10</td>\n      <td>73</td>\n      <td>9</td>\n      <td>65</td>\n    </tr>\n    <tr>\n      <th>李四</th>\n      <td>75</td>\n      <td>29</td>\n      <td>65</td>\n      <td>28</td>\n      <td>64</td>\n      <td>19</td>\n      <td>52</td>\n      <td>7</td>\n      <td>11</td>\n      <td>61</td>\n      <td>96</td>\n      <td>60</td>\n    </tr>\n    <tr>\n      <th>王五</th>\n      <td>29</td>\n      <td>19</td>\n      <td>38</td>\n      <td>70</td>\n      <td>45</td>\n      <td>85</td>\n      <td>65</td>\n      <td>73</td>\n      <td>54</td>\n      <td>96</td>\n      <td>97</td>\n      <td>15</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "outputs": [
    {
     "data": {
      "text/plain": "       期中          期末        \n       语文  数学  英语  语文  数学  英语\n1班 张三   1   3  20  70  12  54\n   李四  13  54  17  99  19  73\n   王五  56  35  66  12  51  70\n2班 赵六   2  75   3  27  85  19\n   田七  72  38  58  65  50  39\n   孙八  78  69   8  37  22  34",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead tr th {\n        text-align: left;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr>\n      <th></th>\n      <th></th>\n      <th colspan=\"3\" halign=\"left\">期中</th>\n      <th colspan=\"3\" halign=\"left\">期末</th>\n    </tr>\n    <tr>\n      <th></th>\n      <th></th>\n      <th>语文</th>\n      <th>数学</th>\n      <th>英语</th>\n      <th>语文</th>\n      <th>数学</th>\n      <th>英语</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th rowspan=\"3\" valign=\"top\">1班</th>\n      <th>张三</th>\n      <td>1</td>\n      <td>3</td>\n      <td>20</td>\n      <td>70</td>\n      <td>12</td>\n      <td>54</td>\n    </tr>\n    <tr>\n      <th>李四</th>\n      <td>13</td>\n      <td>54</td>\n      <td>17</td>\n      <td>99</td>\n      <td>19</td>\n      <td>73</td>\n    </tr>\n    <tr>\n      <th>王五</th>\n      <td>56</td>\n      <td>35</td>\n      <td>66</td>\n      <td>12</td>\n      <td>51</td>\n      <td>70</td>\n    </tr>\n    <tr>\n      <th rowspan=\"3\" valign=\"top\">2班</th>\n      <th>赵六</th>\n      <td>2</td>\n      <td>75</td>\n      <td>3</td>\n      <td>27</td>\n      <td>85</td>\n      <td>19</td>\n    </tr>\n    <tr>\n      <th>田七</th>\n      <td>72</td>\n      <td>38</td>\n      <td>58</td>\n      <td>65</td>\n      <td>50</td>\n      <td>39</td>\n    </tr>\n    <tr>\n      <th>孙八</th>\n      <td>78</td>\n      <td>69</td>\n      <td>8</td>\n      <td>37</td>\n      <td>22</td>\n      <td>34</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = np.random.randint(0, 100, size=(6, 6))\n",
    "index = pd.MultiIndex.from_tuples(\n",
    "    (\n",
    "        ('1班', '张三'), ('1班', '李四'), ('1班', '王五'),\n",
    "        ('2班', '赵六'), ('2班', '田七'), ('2班', '孙八'),\n",
    "    )\n",
    ")\n",
    "columns = [\n",
    "    ['期中', '期中', '期中', '期末', '期末', '期末'],\n",
    "    ['语文', '数学', '英语', '语文', '数学', '英语']\n",
    "]\n",
    "df2 = pd.DataFrame(data=data, index=index, columns=columns)\n",
    "df2"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "outputs": [
    {
     "data": {
      "text/plain": "    期中                                   ...  期末                              \\\n    语文                    数学             ...  数学              英语               \n    孙八 张三  李四  王五  田七 赵六  孙八 张三  李四  王五  ...  李四  王五  田七  赵六  孙八  张三  李四  王五   \n1班   0  1  13  56   0  0   0  3  54  35  ...  19  51   0   0   0  54  73  70   \n2班  78  0   0   0  72  2  69  0   0   0  ...   0   0  50  85  34   0   0   0   \n\n            \n            \n    田七  赵六  \n1班   0   0  \n2班  39  19  \n\n[2 rows x 36 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead tr th {\n        text-align: left;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr>\n      <th></th>\n      <th colspan=\"10\" halign=\"left\">期中</th>\n      <th>...</th>\n      <th colspan=\"10\" halign=\"left\">期末</th>\n    </tr>\n    <tr>\n      <th></th>\n      <th colspan=\"6\" halign=\"left\">语文</th>\n      <th colspan=\"4\" halign=\"left\">数学</th>\n      <th>...</th>\n      <th colspan=\"4\" halign=\"left\">数学</th>\n      <th colspan=\"6\" halign=\"left\">英语</th>\n    </tr>\n    <tr>\n      <th></th>\n      <th>孙八</th>\n      <th>张三</th>\n      <th>李四</th>\n      <th>王五</th>\n      <th>田七</th>\n      <th>赵六</th>\n      <th>孙八</th>\n      <th>张三</th>\n      <th>李四</th>\n      <th>王五</th>\n      <th>...</th>\n      <th>李四</th>\n      <th>王五</th>\n      <th>田七</th>\n      <th>赵六</th>\n      <th>孙八</th>\n      <th>张三</th>\n      <th>李四</th>\n      <th>王五</th>\n      <th>田七</th>\n      <th>赵六</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>1班</th>\n      <td>0</td>\n      <td>1</td>\n      <td>13</td>\n      <td>56</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>3</td>\n      <td>54</td>\n      <td>35</td>\n      <td>...</td>\n      <td>19</td>\n      <td>51</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>54</td>\n      <td>73</td>\n      <td>70</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>2班</th>\n      <td>78</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>72</td>\n      <td>2</td>\n      <td>69</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0</td>\n      <td>50</td>\n      <td>85</td>\n      <td>34</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>39</td>\n      <td>19</td>\n    </tr>\n  </tbody>\n</table>\n<p>2 rows × 36 columns</p>\n</div>"
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.unstack()\n",
    "df2.unstack(fill_value=0)\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "outputs": [
    {
     "data": {
      "text/plain": "       期中          期末        \n       语文  数学  英语  语文  数学  英语\n1班 张三  76  14  60  67  55  74\n   李四  43  39  68  78  67  17\n   王五  46  63  30  14  58  15\n2班 赵六  62  30  98  53  32  31\n   田七  61  52  55  42  61  43\n   孙八   4  74  11   6  10  34",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead tr th {\n        text-align: left;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr>\n      <th></th>\n      <th></th>\n      <th colspan=\"3\" halign=\"left\">期中</th>\n      <th colspan=\"3\" halign=\"left\">期末</th>\n    </tr>\n    <tr>\n      <th></th>\n      <th></th>\n      <th>语文</th>\n      <th>数学</th>\n      <th>英语</th>\n      <th>语文</th>\n      <th>数学</th>\n      <th>英语</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th rowspan=\"3\" valign=\"top\">1班</th>\n      <th>张三</th>\n      <td>76</td>\n      <td>14</td>\n      <td>60</td>\n      <td>67</td>\n      <td>55</td>\n      <td>74</td>\n    </tr>\n    <tr>\n      <th>李四</th>\n      <td>43</td>\n      <td>39</td>\n      <td>68</td>\n      <td>78</td>\n      <td>67</td>\n      <td>17</td>\n    </tr>\n    <tr>\n      <th>王五</th>\n      <td>46</td>\n      <td>63</td>\n      <td>30</td>\n      <td>14</td>\n      <td>58</td>\n      <td>15</td>\n    </tr>\n    <tr>\n      <th rowspan=\"3\" valign=\"top\">2班</th>\n      <th>赵六</th>\n      <td>62</td>\n      <td>30</td>\n      <td>98</td>\n      <td>53</td>\n      <td>32</td>\n      <td>31</td>\n    </tr>\n    <tr>\n      <th>田七</th>\n      <td>61</td>\n      <td>52</td>\n      <td>55</td>\n      <td>42</td>\n      <td>61</td>\n      <td>43</td>\n    </tr>\n    <tr>\n      <th>孙八</th>\n      <td>4</td>\n      <td>74</td>\n      <td>11</td>\n      <td>6</td>\n      <td>10</td>\n      <td>34</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = np.random.randint(0, 100, size=(6, 6))\n",
    "index = pd.MultiIndex.from_tuples(\n",
    "    (\n",
    "        ('1班', '张三'), ('1班', '李四'), ('1班', '王五'),\n",
    "        ('2班', '赵六'), ('2班', '田七'), ('2班', '孙八'),\n",
    "    )\n",
    ")\n",
    "columns = [\n",
    "    ['期中', '期中', '期中', '期末', '期末', '期末'],\n",
    "    ['语文', '数学', '英语', '语文', '数学', '英语']\n",
    "]\n",
    "df2 = pd.DataFrame(data=data, index=index, columns=columns)\n",
    "df2"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "outputs": [
    {
     "data": {
      "text/plain": "1班  张三    346\n    李四    312\n    王五    226\n2班  赵六    306\n    田七    314\n    孙八    139\ndtype: int64"
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.sum()\n",
    "df2.sum(axis=1)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "outputs": [
    {
     "data": {
      "text/plain": "    语文  数学  英语\n张三  43  33  55\n李四  75  65  64\n王五  29  38  45",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>语文</th>\n      <th>数学</th>\n      <th>英语</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>张三</th>\n      <td>43</td>\n      <td>33</td>\n      <td>55</td>\n    </tr>\n    <tr>\n      <th>李四</th>\n      <td>75</td>\n      <td>65</td>\n      <td>64</td>\n    </tr>\n    <tr>\n      <th>王五</th>\n      <td>29</td>\n      <td>38</td>\n      <td>45</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df3 = df.loc['1班', '期中']\n",
    "df3"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "outputs": [
    {
     "data": {
      "text/plain": "张三    55\n李四    75\n王五    45\ndtype: int32"
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df3.sum(axis=1)\n",
    "df3.max(axis=1)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}